#ifndef _MAIN_H_
#define _MAIN_H_

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

#define OK 1
#define ERROR 0
#define OVERFLOW -2

#define SIZE 1000
#define SIZE_INCREASE 100

typedef int Status;
typedef int ElemType;
/*
 * Triple includes 3 elements, data item and the position (i, j) in the matrix 
 * STList[] is the Sequential Triple List
 */
typedef struct Triple
{
    ElemType data;
    int i, j;
}Triple;
typedef struct
{
    Triple *item;
    int size;
}STList;
/*
 * STLTMatrix is Sequential Triple List Sparse Matrix
 *  col and row are the number of columns and rows in the matrix
 *  num is the number of the non-zero element in the matrix
 *  L is a sequential triple list
 */
typedef struct
{
    int col, row;
    int num;
    STList L;
}STLSMatrix;

#endif